<h3>联系信息<a  class="选择联系人" ><input type="button" value="选择" class="l-button" onclick="clickButton(${o.rmsUserId})"/></a></h3>
<table class="l-table-edit">
			   <tr>
					<td class="td_lbl">乘客姓名：</td>
					<td>
						<input name="consumerName" id="consumerName" value="${o.consumerName}" maxlength="128"  validate="{,maxlength:128}" />
					</td>
					<td class="td_lbl">性别：</td>
					<td>
						<select name="consumerSex" id="consumerSex" >
							<option value="">-- 请选择 --</option>
							<#list sexs as sex>
								<option value="${sex.value}" <#if (sex.value == "${o.consumerSex}")> selected=selected </#if>>${sex.text}</option>
							</#list>
						</select>
					</td>
				</tr>
				<tr>
					<td class="td_lbl">移动电话：</td>
					<td>
						<input name="consumerMobile" id="consumerMobile" value="${o.consumerMobile}" maxlength="128"  validate="{,maxlength:128}" />
					</td>
					<td class="td_lbl">固定电话：</td>
					<td>
						<input name="consumerPhone" id="consumerPhone" value="${o.consumerPhone}" maxlength="128"  validate="{,maxlength:128}" />
					</td>
				</tr>
					<td class="td_lbl">证件类型：</td>
					<td>
						<select name="consumerIdcardType" id="consumerIdcardType" >
							<option value="">-- 请选择 --</option>
							<#list idcardTypes as idcardtype>
								<option value="${idcardtype.value}" <#if (idcardtype.value == "${o.consumerIdcardType}")> selected=selected </#if>>${idcardtype.text}</option>
							</#list>
						</select>
					</td>
					<td class="td_lbl">证件号码：</td>
					<td>
						<input name="consumerIdcardNo" id="consumerIdcardNo" value="${o.consumerIdcardNo}" maxlength="256"  validate="{,maxlength:256}" />
					</td>
				</tr>
	</table>
<script type="text/javascript">
function clickButton(rmsId){
	var url=$rmsServer+"/consumer/query/"+rmsId;
	
    parent.$.ligerDialog.open({ width: 750, height: 400,
		 title: '联系人', url: url, buttons: [
                                           { text: '确定', onclick: function (item,dialog)
                                           {
                                        	 dialog.frame.valParm();
                                          	 var data = dialog.frame.grid.getSelectedRow();
                                             setConsumerInfo(data);
                                             dialog.close();
                                             dialog.hide();
                                           } 
                                           }
                                           ], isResize: true
                                           });
}

function setConsumerInfo(rowdata){
	$('#consumerName').val(rowdata.name);
	$('#consumerSex').val(rowdata.sex);
	$('#consumerMobile').val(rowdata.mobile);
	$('#consumerPhone').val(rowdata.phone);
	$('#consumerIdcardType').val(rowdata.idcardType);
	$('#consumerIdcardNo').val(rowdata.idcardNo);
}
</script>
	
